.class public Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter;
.super Landroid/widget/BaseAdapter;
.source "BrandTypeAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter$ViewHolder;
    }
.end annotation


# instance fields
.field TAG:Ljava/lang/String;

.field list:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/bitauto/autoeasy/selectcar/Object/CarSummary;",
            ">;"
        }
    .end annotation
.end field

.field private mInflater:Landroid/view/LayoutInflater;

.field private final prefix:Ljava/lang/String;

.field private final prefix1:Ljava/lang/String;


# direct methods
.method public constructor <init>(Ljava/util/ArrayList;Landroid/content/Context;Landroid/widget/ListView;)V
    .locals 1
    .parameter
    .parameter "context"
    .parameter "listView"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/bitauto/autoeasy/selectcar/Object/CarSummary;",
            ">;",
            "Landroid/content/Context;",
            "Landroid/widget/ListView;",
            ")V"
        }
    .end annotation

    .prologue
    .line 30
    .local p1, list:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/bitauto/autoeasy/selectcar/Object/CarSummary;>;"
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 26
    const-string v0, "\u6307\u5bfc\u4ef7:"

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter;->prefix:Ljava/lang/String;

    .line 27
    const-string v0, "\u7ecf\u9500\u5546\u62a5\u4ef7:"

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter;->prefix1:Ljava/lang/String;

    .line 28
    const-string v0, "BrandAdapter"

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter;->TAG:Ljava/lang/String;

    .line 32
    iput-object p1, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter;->list:Ljava/util/ArrayList;

    .line 33
    invoke-static {p2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter;->mInflater:Landroid/view/LayoutInflater;

    .line 34
    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 38
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter;->list:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .parameter "position"

    .prologue
    .line 43
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter;->list:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 49
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 9
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    const/4 v7, 0x0

    const/high16 v6, 0x7f0b

    const-string v8, "\u4e07 "

    .line 64
    move-object v2, p2

    .line 65
    .local v2, root:Landroid/view/View;
    invoke-virtual {p0, p1}, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter;->getItem(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/bitauto/autoeasy/selectcar/Object/CarSummary;

    .line 66
    .local v0, carSummary:Lcom/bitauto/autoeasy/selectcar/Object/CarSummary;
    invoke-virtual {p0, p1}, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter;->isEnabled(I)Z

    move-result v4

    if-eqz v4, :cond_0

    .line 68
    iget-object v4, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter;->mInflater:Landroid/view/LayoutInflater;

    const v5, 0x7f030004

    invoke-virtual {v4, v5, v7}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v2

    .line 70
    new-instance v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter$ViewHolder;

    invoke-direct {v1}, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter$ViewHolder;-><init>()V

    .line 71
    .local v1, holder:Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter$ViewHolder;
    invoke-virtual {v2, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p0

    .end local p0
    check-cast p0, Landroid/widget/TextView;

    iput-object p0, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter$ViewHolder;->name:Landroid/widget/TextView;

    .line 72
    const v4, 0x7f0b0003

    invoke-virtual {v2, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p0

    check-cast p0, Landroid/widget/TextView;

    iput-object p0, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter$ViewHolder;->price:Landroid/widget/TextView;

    .line 73
    const v4, 0x7f0b0004

    invoke-virtual {v2, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p0

    check-cast p0, Landroid/widget/TextView;

    iput-object p0, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter$ViewHolder;->price2:Landroid/widget/TextView;

    .line 74
    const v4, 0x7f0b0001

    invoke-virtual {v2, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    iput-object v4, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter$ViewHolder;->imageview:Landroid/view/View;

    .line 80
    iget-object v4, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter$ViewHolder;->price:Landroid/widget/TextView;

    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "\u6307\u5bfc\u4ef7:"

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/CarSummary;->getReferPrice()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "\u4e07 "

    invoke-virtual {v5, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 81
    iget-object v4, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter$ViewHolder;->price2:Landroid/widget/TextView;

    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "\u7ecf\u9500\u5546\u62a5\u4ef7:"

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/CarSummary;->getRang()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "\u4e07 "

    invoke-virtual {v5, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 82
    iget-object v4, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter$ViewHolder;->name:Landroid/widget/TextView;

    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/CarSummary;->getCarName()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 83
    iget-object v4, v1, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter$ViewHolder;->imageview:Landroid/view/View;

    const/16 v5, 0x8

    invoke-virtual {v4, v5}, Landroid/view/View;->setVisibility(I)V

    .line 89
    .end local v1           #holder:Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter$ViewHolder;
    :goto_0
    return-object v2

    .line 85
    .restart local p0
    :cond_0
    iget-object v4, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter;->mInflater:Landroid/view/LayoutInflater;

    const v5, 0x7f030003

    invoke-virtual {v4, v5, v7}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v2

    .line 86
    invoke-virtual {v2, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    .line 87
    .local v3, textView:Landroid/widget/TextView;
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/CarSummary;->getImagePath()Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v5, " \u6b3e"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0
.end method

.method public isEnabled(I)Z
    .locals 1
    .parameter "position"

    .prologue
    .line 54
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/BrandTypeAdapter;->list:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/bitauto/autoeasy/selectcar/Object/CarSummary;

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/Object/CarSummary;->getCarName()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v0

    if-lez v0, :cond_0

    .line 55
    const/4 v0, 0x1

    .line 57
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method
